<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        function object(o){
            function F(){};
            F.prototype=o;
            return new F();
        }

        var peo={
            name:"你还",
            friend: ["xiaoming","jaj"]
        }
        var obj1= object(peo);
        console.log(obj1);
        obj1.name='jaj ';
        var obj2= object(peo);
        obj2.friend.push("adsad");
        var obj3= object(peo);
        obj3.friend.push("dadswq");
        console.log(peo.friend);
        console.log(obj1.friend);
        console.log(obj2.friend);
        console.log(obj3.friend);
        console.log(peo.name);
        console.log(obj1.name);
        console.log(obj2.name);
        console.log(obj3.name);
    </script>
</body>
</html>